<template xmlns:v-on="http://www.w3.org/1999/xhtml">
<div class="rich-area fluid field">
    <field_title :title_show="!field.hideTitle&&!field.no_title" :field="field" ></field_title>
  <ueditor :value=val ref="ueditor" :config=config @input="input" @ready="ready"></ueditor>
</div>
</template>

<script>
import ueditor from './ueditor2.vue';
import util from '_util/index';
import tool from 'src/util/tool';
import field_title from 'components/field/com/field_title';

export default {
  components: {
    ueditor,
      field_title
  },
  watch: {
    val: function(val, old) {
      if (val != old) {
        this.$emit('setVo', this.field.name, val)
      }
    }
  },
  methods: {
    input(obj) {
      this.val = obj.content
    },
    ready() {

    },
  },
  props: ['field','param'],
  created() {
      this.val = this.field.fval || '';
  },
  data() {
    return {
      val: '',
      config: {
        initialFrameWidth: null,
        initialFrameHeight: 320,
      },
    };
  },
};
</script>
<style rel="stylesheet/less" lang="less" scoped>
  .rich-area{
    overflow: hidden;
  }
  .edui-default{
    color: #000;
  }
</style>
